#include "main.h"
#include "color.h"
#include"manager.h"
#include"client.h"
void main_menu()//主界面
{
    printf(FONT_HIGHLIGHT_CYAN "\t♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" DEFAULT_MODE "\n");
    printf(FONT_HIGHLIGHT_YELLOW "\t♥♥♥♥♥♥♥♥♥♥♥"   BLINK"\t石马湾农庄    "DEFAULT_MODE FONT_HIGHLIGHT_YELLOW   "♥♥♥♥♥♥♥♥♥♥♥" DEFAULT_MODE "\n");
    printf(FONT_HIGHLIGHT_RED "\t♥♥♥♥♥♥♥♥♥♥♥    1.管理人员     ♥♥♥♥♥♥♥♥♥♥♥" DEFAULT_MODE "\n");
    printf(FONT_HIGHLIGHT_BLUE "\t♥♥♥♥♥♥♥♥♥♥♥    2.顾客点餐     ♥♥♥♥♥♥♥♥♥♥♥" DEFAULT_MODE "\n");
    printf(FONT_HIGHLIGHT_GREEN "\t♥♥♥♥♥♥♥♥♥♥♥    0.退出         ♥♥♥♥♥♥♥♥♥♥♥" DEFAULT_MODE "\n");
    printf(FONT_HIGHLIGHT_CYAN "\t♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" DEFAULT_MODE "\n");
}
void main_choose(ManagerLinkList L, ElemType e, int *sum_1,  Mana *A,  Mana *B)
{
    int input = 0;
    do
    {
        main_menu();
        printf(FONT_HIGHLIGHT_PURPLE BLINK"请选择您的身份："DEFAULT_MODE);
        scanf("%d", &input);
        system("clear");
        while (getchar() != '\n')
            ;
        switch (input)
        {
        case 1:
            manager_choose(L, e, sum_1, A, B);
            break;
        case 2:
            client_choose(L);
            break;
        case 0:
            printf(FONT_PURPLE "\t正在退出系统..." DEFAULT_MODE "\n");
            sleep(2);
            break;
        default:
            printf(FONT_HIGHLIGHT_RED "\t输入错误！请重新输入：\n" DEFAULT_MODE);
            break;
        }
    } while (input);
}
int main()
{
    Mana A;
    Mana B;
    ElemType e;
    ManagerLinkList L = NULL;
    int sum_1 = 1;
    InitList_Manager(&L);
    main_choose(L, e, &sum_1, &A, &B);
    return 0;
}